package com.bienvenue.main.adapter;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;

import com.bienvenue.main.R;
import com.bienvenue.main.model.HotPromptModel;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

/**
 * @ProjectName: Bienvenue
 * @Package: com.bienvenue.main.adapter.HotPromptAdapter
 * @ClassName: HotPromptAdapter
 * @Description: java类作用描述
 * @Author: Mr.Chen
 * @CreateDate: 2020/9/8 9:51
 * @UpdateUser: Mr.Chen
 * @UpdateDate: 2020/9/8 9:51
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */


public class HotPromptAdapter extends BaseQuickAdapter<HotPromptModel.DataBean.RecordsBean, BaseViewHolder> {
    public HotPromptAdapter() {
        super(R.layout.item_hot_prompt);
    }

    @Override
    protected void convert(BaseViewHolder helper, HotPromptModel.DataBean.RecordsBean item) {
        helper.setText(R.id.tv_prompt_name, item.getCompanyname())
//                .setText(R.id.tv_prompt_details, item.get())
//                .setText(R.id.tv_hot_prompt, item.getHotPosition())
                .addOnClickListener(R.id.tv_go_see);
//        RecyclerView rvList=helper.getView(R.id.rv_benefits_list);
//        LinearLayoutManager linearLayoutManager=new LinearLayoutManager(mContext);
//        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
//        rvList.setLayoutManager(linearLayoutManager);
//        mAdapter=new BenefitsAdapter();
//        rvList.setAdapter(mAdapter);
//        mAdapter.setNewData(item.getBenefits());

        ImageView ivLogo = helper.getView(R.id.iv_prompt_logo);

        Glide.with(mContext).load(item.getLogo()).into(ivLogo);


    }
}
